package com.example.lin.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Administrator
 */
@Getter
@AllArgsConstructor
public enum ResponseContent {
    SUCCESS(200, "操作成功"),
    ERROR(500, "操作失败"),
    UNAUTHORIZED(401, "用户未登录"),
    FORBIDDEN(403, "用户无权限"),
    NOT_FOUND(404, "请求路径不存在"),
    PARAM_ERROR(400, "参数错误"),
    PARAM_NULL(400, "参数为空"),
    PARAM_ILLEGAL(400, "参数不合法"),
    PARAM_NOT_FOUND(400, "参数未找到"),
    PARAM_NOT_MATCH(400, "参数不匹配"),

    USER_NOT_FOUND(404, "用户未找到"),
    USER_PASSWORD_ERROR(400, "用户名或密码错误"),
    USER_EXIST(400, "用户已存在"),
    USER_NOT_EXIST(400, "用户不存在"),
    USER_NOT_ACTIVATED(400, "用户未激活"),
    USER_NOT_ENABLED(400, "用户未启用"),
    USER_NOT_LOCKED(400, "用户未锁定"),
    USER_LOCKED(400, "用户已锁定"),

    ARTICLE_NOT_FOUND(404, "文章未找到"),
    ARTICLE_NOT_PUBLISHED(400, "文章未发布"),
    ARTICLE_NOT_PUBLISHED_BY_USER(400, "文章未发布或无权限"),
    ARTICLE_NOT_PUBLISHED_BY_ADMIN(400, "文章未发布或无权限"),
    ARTICLE_NOT_PUBLISHED_BY_AUTHOR(400, "文章未发布或无权限");

    private final Integer code;

    private final String msg;
}
